Proper button naming + more button support on unix#8
Proper button naming + more button support on unix#8roel-gerrits wants to merge 6 commits intopepijndevos:masterfrom roel-gerrits:master
Conversation
supports all scroll buttons and thumb buttons. Adapted the windows, mac and unix modules to use that class. In reply to: 43b69c8#commitcomment-295776
Not tested on Mac and Windows
|
Lucky you, I'm running a Mac. It seems that not all buttons are supported by al systems? If the API has no support for thousands of buttons, so be it, but my mouse has these squeeze buttons no one uses, I'll look at the API if I can find something about that. |
|
I dont know for sure but mac.py on line 21 and 22 indicate so.
|
|
Okay, everything seems to work fine on Mac, but are you absolutely sure the button number are consistent on all platforms for both controlling and listening? When I run a simple PyMouseEvent on Mac, I get number 3 on right, and 2 on both the middle and squeeze buttons. When I run tests/basic.py, 2 is the right click and 3 the middle one. Something strange is going on here. It is said in the doc strings that 1 = left, 2 = right, 3 = middle. We should stick to that across all platforms for obvious reasons. I also found out button numbers 3-31 are supplied on the event for kCGEventOtherMouseDown and Up, but I have yet to find a way to retrieve this number. Will you manage that as well, or should I do that, since I run a Mac? |
|
Ah, this returns the button number for a mouse event. n+1 is consistent with the docs. |
I have a mouse with thumb buttons, they when pressed they raise errors.
I fixed it in reply to: 43b69c8#commitcomment-295776
On unix systems all* buttons are now supported
tested on linux and windows, not tested on mac!
*) Left, middle, right, scroll-up -down -left -right and thumb-forward -backward